﻿<wnd:VecDrawDialog x:Class="WickedFlame.VecDraw.Dialog.ImageCanvasSizeDialog"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:wnd="clr-namespace:WickedFlame.VecDraw.Base.Controls;assembly=VecDraw.Base"
    Title="Paste" SizeToContent="Height" Width="300" Foreground="WhiteSmoke">

    <Window.Resources>

        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="../Resources/ControlTemplates.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>

    </Window.Resources>

    <Grid>
        <Grid.Resources>
            <Image Source="/VecDraw.Resources;component/Images/VecDraw.Icon.CloseGray.png" x:Key="imageClose"/>
            <Image Source="/VecDraw.Resources;component/Images/VecDraw.Icon.ResizeCanvas.png" x:Key="imageExpand"/>
            <Image Source="/VecDraw.Resources;component/Images/VecDraw.Icon.NoCanvasResize.png" x:Key="imageKeepSize"/>
        </Grid.Resources>
        <Grid.Background>
            <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                <GradientStop Offset="0.0" Color="#484848" />
                <GradientStop Offset="1.0" Color="#282828" />
            </LinearGradientBrush>
        </Grid.Background>

        <Grid Margin="5">
            <Grid.RowDefinitions>
                <RowDefinition Height="55"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>

            <Grid Margin="0,0,0,10">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Border BorderBrush="WhiteSmoke" BorderThickness="1" Background="Transparent" CornerRadius="4" Padding="3">
                    <Viewbox MaxWidth="50" Grid.Column="0">
                        <Image Name="imageDisplay"/>
                    </Viewbox>
                </Border>

                <TextBlock Grid.Column="1" TextWrapping="Wrap" HorizontalAlignment="Stretch" Margin="5,3,0,0" Text="The size of the pasted image is bigger than the size of the canvas"/>
            </Grid>

            <Separator Grid.Row="1" Margin="0,0,0,10"/>
            <wnd:ImageTextButton Grid.Row="2" IsDefault="True" Icon="{StaticResource imageExpand}" Title="Expand Canvas"  ButtonText="Resizes the canvas to fit the image" Name="btnResize" Click="btnResize_Click" Background="Transparent"/>
            <wnd:ImageTextButton Grid.Row="3" Icon="{StaticResource imageKeepSize}" Title="Keep size"  ButtonText="Keeps the size of the canvas" Name="btnStay" Click="btnStay_Click" Background="Transparent"/>
            <wnd:ImageTextButton Grid.Row="4" Icon="{StaticResource imageClose}" Title="Cancle" Name="btnCancle" ButtonText="Cancles th paste operation" Click="btnCancle_Click" Background="Transparent"/>
        </Grid>
    </Grid>
</wnd:VecDrawDialog>
